﻿<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8"/>
    <title>控制台</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <div th:replace="common/header::header"></div>
</head>

<body>
<div class="main-container" id="main-container">
    <div class="">
        <div>
            <ul class="breadcrumb">
                <li>
                    <i class="icon-home home-icon"></i>
                    <a href="#">首页</a>
                </li>
                <li class="active">用户管理</li>
            </ul><!-- .breadcrumb -->
        </div>

        <div class="page-content">
            <div class="page-header">
                <h1 th:if="${pagetype eq '0' }">查看用户</h1>
                <h1 th:if="${pagetype eq '1' }">编辑用户</h1>
                <h1 th:if="${pagetype eq '2' }">添加用户</h1>
            </div><!-- /.page-header -->
            <div class="row">
                <div class="col-xs-12">
                    <!-- PAGE CONTENT BEGINS -->
                    <div class="table-responsive">
                        <a class="btn btn-sm btn-success" style="margin-bottom: 10px" href="/user/list">
                            <i class="icon-reply"></i>
                            返回
                        </a>

                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12">
                    <!-- PAGE CONTENT BEGINS -->

                    <form class="form-horizontal" role="form" action="/user/edit" method="post">

                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="id"> ID </label>
                            <div class="col-sm-9">
                                <input readonly="" type="text" class="col-xs-2 col-sm-2" id="id" name="id"
                                       th:value="${user.id}"/>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="username"> 用户名 </label>
                            <div class="col-sm-9">
                                <input type="text" id="username" name="username" placeholder="Username"
                                       class="col-xs-10 col-sm-5" th:value="${user.username}"/>
                            </div>
                        </div>

                        <div class="space-4"></div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" name="password"
                                   for="password">密码 </label>
                            <div class="col-sm-9">
                                <input type="password" id="password" name="password" placeholder="Password"
                                       class="col-xs-10 col-sm-5" th:value="${user.password}"/>
                            </div>
                        </div>

                        <div class="space-4"></div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="avatar"> 头像 </label>
                            <div class="col-sm-9">
                                <input type="text" id="avatar" name="avatar" placeholder="avatar"
                                       class="col-xs-10 col-sm-5" th:value="${user.avatar}"/>
                            </div>
                        </div>
                        <div class="form-group has-error" th:switch="${message != null }">
                            <div th:case="true" class="help-block inline " th:text="${message}"></div>
                        </div>
                        <div class="clearfix form-actions" th:if="${pagetype ne '0'}">
                            <div class=" col-md-offset-3 col-md-9">
                                <button class="btn btn-info" type="submit">
                                    <i class="icon-ok bigger-110"></i>
                                    提交
                                </button>
                                &nbsp; &nbsp; &nbsp;
                                <button class="btn" type="reset">
                                    <i class="icon-undo bigger-110"></i>
                                    重置
                                </button>
                            </div>
                        </div>
                </div>
            </div>

        </div><!-- /.main-container -->

    </div>


</div>
</body>
<footer>
    <div th:replace="common/footer::footer_js"></div>
    <!--<div th:replace="common/footer::footer_text"></div>-->
</footer>
</html>

